package com.infindo.frame.data.mo;

import java.io.Serializable;

import org.json.JSONObject;

import com.infindo.frame.util.JSONUtil;

 

public abstract class MoliscMessage implements Serializable{

	/**
     * 
     */
    private static final long serialVersionUID = -5086986087741155478L;
    private String clazz;
	
	public String getClazz() {
		if(clazz==null)
			return this.getClass().getSimpleName();
		else
			return clazz;
	}

	public void setClazz(String clazz) {
		this.clazz = clazz;
	}

	public JSONObject wrapObject(){
		try {
			return JSONUtil.wrapObject(this);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}
	
	public abstract void toObject(JSONObject jsonObj);
	
	public abstract void toObject(JSONObject jsonObj,String cmsListParameters);
}
